import request from "@/utils/request";

// 查询标准库信息列表
export function listLibrary(query) {
  return request({
    url: "/management-admin/library/page",
    method: "get",
    params: query,
  });
}

// 查询标准库信息详细
export function getLibrary(id) {
  return request({
    url: "/management-admin/library/" + id,
    method: "get",
  });
}

// 新增标准库信息
export function addLibrary(data) {
  return request({
    url: "/management-admin/library",
    method: "post",
    headers: {
      timeout: 500000,
    },
    data: data,
  });
}

// 修改标准库信息
export function updateLibrary(data) {
  return request({
    url: "/management-admin/library",
    method: "put",
    data: data,
  });
}

// 删除标准库信息
export function delLibrary(id) {
  return request({
    url: "/management-admin/library/" + id,
    method: "delete",
  });
}

// 上传文件
export function impoertLibrary(query) {
  return request({
    url: "/management-admin/library/import",
    method: "post",
    params: query,
  });
}

//同步pdf和表单id
export function savePdf(data) {
  return request({
    url: "/management-admin/library/savePdf",
    method: "post",
    data,
  });
}
